#include "Test.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* Test_classType = NULL;
VTable* Test_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* Void make() */
void Test_make(Test* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.make not implemented yet"));
}


/* Method curTestMethod() */
Method* Test_curTestMethod(Test* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.curTestMethod not implemented yet"));
}


/* Void setup() */
void Test_setup(Test* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.setup not implemented yet"));
}


/* Void teardown() */
void Test_teardown(Test* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.teardown not implemented yet"));
}


/* Void verify(Bool cond, Str? msg) */
void Test_verify_1(Test* self, Bool cond)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verify not implemented yet"));
}


/* Void verify(Bool cond, Str? msg) */
void Test_verify(Test* self, Bool cond, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verify not implemented yet"));
}


/* Void verifyFalse(Bool cond, Str? msg) */
void Test_verifyFalse_1(Test* self, Bool cond)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyFalse not implemented yet"));
}


/* Void verifyFalse(Bool cond, Str? msg) */
void Test_verifyFalse(Test* self, Bool cond, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyFalse not implemented yet"));
}


/* Void verifyNull(Obj? a, Str? msg) */
void Test_verifyNull_1(Test* self, NullableObj a)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNull not implemented yet"));
}


/* Void verifyNull(Obj? a, Str? msg) */
void Test_verifyNull(Test* self, NullableObj a, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNull not implemented yet"));
}


/* Void verifyNotNull(Obj? a, Str? msg) */
void Test_verifyNotNull_1(Test* self, NullableObj a)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNotNull not implemented yet"));
}


/* Void verifyNotNull(Obj? a, Str? msg) */
void Test_verifyNotNull(Test* self, NullableObj a, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNotNull not implemented yet"));
}


/* Void verifyEq(Obj? a, Obj? b, Str? msg) */
void Test_verifyEq_2(Test* self, NullableObj a, NullableObj b)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyEq not implemented yet"));
}


/* Void verifyEq(Obj? a, Obj? b, Str? msg) */
void Test_verifyEq(Test* self, NullableObj a, NullableObj b, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyEq not implemented yet"));
}


/* Void verifyNotEq(Obj? a, Obj? b, Str? msg) */
void Test_verifyNotEq_2(Test* self, NullableObj a, NullableObj b)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNotEq not implemented yet"));
}


/* Void verifyNotEq(Obj? a, Obj? b, Str? msg) */
void Test_verifyNotEq(Test* self, NullableObj a, NullableObj b, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNotEq not implemented yet"));
}


/* Void verifySame(Obj? a, Obj? b, Str? msg) */
void Test_verifySame_2(Test* self, NullableObj a, NullableObj b)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifySame not implemented yet"));
}


/* Void verifySame(Obj? a, Obj? b, Str? msg) */
void Test_verifySame(Test* self, NullableObj a, NullableObj b, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifySame not implemented yet"));
}


/* Void verifyNotSame(Obj? a, Obj? b, Str? msg) */
void Test_verifyNotSame_2(Test* self, NullableObj a, NullableObj b)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNotSame not implemented yet"));
}


/* Void verifyNotSame(Obj? a, Obj? b, Str? msg) */
void Test_verifyNotSame(Test* self, NullableObj a, NullableObj b, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyNotSame not implemented yet"));
}


/* Void verifyType(Obj obj, Type t) */
void Test_verifyType(Test* self, Obj obj, Type* t)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyType not implemented yet"));
}


/* Void verifyErr(Type errType, |Test->Void| c) */
void Test_verifyErr(Test* self, Type* errType, Func* c)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.verifyErr not implemented yet"));
}


/* Void fail(Str? msg) */
void Test_fail_0(Test* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.fail not implemented yet"));
}


/* Void fail(Str? msg) */
void Test_fail(Test* self, Str* msg)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.fail not implemented yet"));
}


/* File tempDir() */
File* Test_tempDir(Test* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Test.tempDir not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* Test_initType(void)
{
  if (Test_classType == NULL)
  {
    Type* baseType = Obj_initType();
    VTable* vtable = Test_initVTable();
    Type* type = Type_new("Test", baseType, vtable, sizeof(Test), sizeof(TestVTable));
    Type_registerCtorImplementation(type, "make", Test_make, 0);
    Type_registerMethodImplementation(type, "curTestMethod", Test_curTestMethod, 0);
    Type_registerMethodImplementation(type, "fail", Test_fail_0, 0);
    Type_registerMethodImplementation(type, "fail", Test_fail, 1);
    Type_registerMethodImplementation(type, "setup", Test_setup, 0);
    Type_registerMethodImplementation(type, "teardown", Test_teardown, 0);
    Type_registerMethodImplementation(type, "tempDir", Test_tempDir, 0);
    Type_registerMethodImplementation(type, "verify", Test_verify_1, 1);
    Type_registerMethodImplementation(type, "verify", Test_verify, 2);
    Type_registerMethodImplementation(type, "verifyEq", Test_verifyEq_2, 2);
    Type_registerMethodImplementation(type, "verifyEq", Test_verifyEq, 3);
    Type_registerMethodImplementation(type, "verifyErr", Test_verifyErr, 2);
    Type_registerMethodImplementation(type, "verifyFalse", Test_verifyFalse_1, 1);
    Type_registerMethodImplementation(type, "verifyFalse", Test_verifyFalse, 2);
    Type_registerMethodImplementation(type, "verifyNotEq", Test_verifyNotEq_2, 2);
    Type_registerMethodImplementation(type, "verifyNotEq", Test_verifyNotEq, 3);
    Type_registerMethodImplementation(type, "verifyNotNull", Test_verifyNotNull_1, 1);
    Type_registerMethodImplementation(type, "verifyNotNull", Test_verifyNotNull, 2);
    Type_registerMethodImplementation(type, "verifyNotSame", Test_verifyNotSame_2, 2);
    Type_registerMethodImplementation(type, "verifyNotSame", Test_verifyNotSame, 3);
    Type_registerMethodImplementation(type, "verifyNull", Test_verifyNull_1, 1);
    Type_registerMethodImplementation(type, "verifyNull", Test_verifyNull, 2);
    Type_registerMethodImplementation(type, "verifySame", Test_verifySame_2, 2);
    Type_registerMethodImplementation(type, "verifySame", Test_verifySame, 3);
    Type_registerMethodImplementation(type, "verifyType", Test_verifyType, 2);
    Test_classType = type;
    Test_initStatic();
  }
  return Test_classType;
}


VTable* Test_initVTable(void)
{
  if (Test_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(TestVTable));
    memcpy(vtable, Obj_initVTable(), sizeof(FanObjVTable));
    ((TestVTable*)vtable)->setup = Test_setup;
    ((TestVTable*)vtable)->teardown = Test_teardown;
    Test_classVTable = vtable;
  }
  return Test_classVTable;
}


void Test_initStatic(void)
{
}
